from rest_framework.serializers import ModelSerializer

from app01.models import *


class CateModelSerializer(ModelSerializer):
    class Meta:
        model = Cate
        fields = '__all__'


class BooksModelSerializer(ModelSerializer):
    class Meta:
        model = Books
        fields = '__all__'


class ShowBookSerializer(ModelSerializer):
    cate = CateModelSerializer()

    class Meta:
        model = Books
        fields = '__all__'
